package com.kongyz.observer;

import com.kongyz.Subject;

/**
 * @author kongyz
 * @date 2018/7/3 21:48
 * @Description:
 */
public class HexaObserver extends Observer {

    public HexaObserver(Subject subject) {
        this.subject=subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("十六进制："+Integer.toHexString(subject.getState()));
    }
}
